import socket

socket_client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket_client.connect(('127.0.0.1', 9999))

while True:
    content = input('请输入发送的信息\n')
    if content == 'quit':
        break
    # 发送信息到服务端
    socket_client.send(content.encode('utf-8'))
    recv_content = socket_client.recv(1024).decode('utf-8')
    print('server_recv_content', recv_content)

socket_client.close()
